package com.hospital.demo.service.impl.jiajinpeng;

import com.hospital.demo.mapper.jiajinpeng.OutHospitalMapper;
import com.hospital.demo.mapper.jiajinpeng.polyMapper.OutAllHospitalMapper;
import com.hospital.demo.model.jiajinpeng.OutHospital;
import com.hospital.demo.model.jiajinpeng.poly.OutAllHospital;
import com.hospital.demo.service.jiajinpeng.OutHospitalSer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OutHospitalImpl implements OutHospitalSer {

    @Autowired
    private OutAllHospitalMapper outAllHospitalMapper;

    @Autowired
    private OutHospitalMapper outHospitalMapper;

    @Override
    public List<OutAllHospital> selectAlllist() {
        return outAllHospitalMapper.findAll();
    }

    @Override
    public List<OutAllHospital> selectByname(String pname) {
        return outAllHospitalMapper.findAllbyname(pname);
    }

    @Override
    public int insert(OutHospital outHospital) {
        return outHospitalMapper.insert(outHospital);
    }
}
